//
//  ZMEmotionModel.swift
//  ZMWeiboSwift
//
//  Created by pg on 2017/8/1.
//  Copyright © 2017年 pg. All rights reserved.
//

import UIKit

class ZMEmotionModel: NSObject,NSCoding {

    //表情描述
    var chs: String?
    
    //图片名称
    var png: String?
    //表情类型
    var type: String?
    //emoji对应的16进制的数字
    var code: String?
    //图片路径
    var path: String?
    
    //  MARK: --    归档和解档
    func encode(with aCoder: NSCoder) {
        aCoder.encode(chs, forKey: "chs")
        aCoder.encode(png, forKey: "png")
        aCoder.encode(type, forKey: "type")
        aCoder.encode(code, forKey: "code")
        aCoder.encode(path, forKey: "path")
    }
    required init?(coder aDecoder: NSCoder) {
        chs = aDecoder.decodeObject(forKey: "chs") as? String
        png = aDecoder.decodeObject(forKey: "png") as? String
        type = aDecoder.decodeObject(forKey: "type") as? String
        code = aDecoder.decodeObject(forKey: "code") as? String
        path = aDecoder.decodeObject(forKey: "path") as? String
    }
    //  重写init构造函数，目的让YYModel
    override init() {
        super.init()
    }

    
    
}
